Non-volatile random access memory (“NVRAM,” see definition of NVRAM, below) is an electronic, non-volatile machine readable storage medium that can be electrically erased and rewritten. One type of NVRAM is flash memory. Two main types of flash memory are: (i) NAND logic gate type; and (ii) NOR logic gate type. NAND type flash memory may be written and read in blocks (or pages), which are generally much smaller than the entire device. The NOR type allows a single machine word (byte) to be written or read independently.
Flash memory management (and other NVRAM management) will often associate a single logical block address to many different physical addresses. More specifically, as the host issues updated writes for a particular logical address, the old physical address is invalidated and a new physical address is now associated with the logical address. This helps to maintain a high level of throughput. A single physical block includes portions of data that will respectively correspond to many different logical addresses. Physical blocks will often, over time, come to consist of both of the following: (i) old, invalid data; and (ii) currently valid (also called “new”) data.
In some conventional NVRAM memory systems, data is written to physical memory at a granularity level that is different from the granularity level at which data is erased from the physical memory. In currently conventional flash memories, erases are performed on a block by block basis, while programs (or “writes”) are performed on a page by page basis. Due to this granularity difference, when a block has been subject to data erasure (herein referred to as an “erased block”) data must be relocated from the erased block to another block in order to avoid losing data that is still current and not meant to be erased. This “garbage collection” process is necessary to reclaim blocks for new incoming writes. This is conventionally done solely considering validity. Valid pages will be relocated to a new block and paired with more valid pages from other blocks. The number of pages within a block will vary across different flash memory devices. This method makes the assumption that the valid pages being relocated are “colder” data. “Cold” data is that which is rarely overwritten, while “hot” data is that which is overwritten frequently.